home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / sniffer11.txt < prev    next >
Text File  |  2001-07-11  |  19KB  |  459 lines

  1. Sniffer FAQ
  2.  
  3. Version: 1.7
  4. -------------------------------------------------------------------------------
  5. This Security FAQ is a resource provided by:
  6.  
  7.      Internet Security Systems, Inc.
  8.      2000 Miller Court West            Tel: (770) 441-2531
  9.      Norcross, Georgia  30071          Fax: (770) 441-2431
  10.  
  11.      - Internet Scanner ... the most comprehensive "attack simulator"
  12.      available. -
  13.  
  14. -------------------------------------------------------------------------------
  15. To get the newest updates of Security files check the following services:
  16.  
  17.      mail info@iss.net with "send index" in message
  18.      http://iss.net/
  19.      ftp iss.net /pub/
  20.  
  21. -------------------------------------------------------------------------------
  22. This Sniffer FAQ will hopefully give administrators a clear understanding of
  23. sniffing problems and hopefully possible solutions to follow up with. Sniffers
  24. is one of the main causes of mass break-ins on the Internet today.
  25.  
  26. This FAQ will be broken down into:
  27.  
  28.    *  What a sniffer is and how it works
  29.    *  Where are sniffers available
  30.    *  How to detect if a machine is being sniffed
  31.    *  Stopping sniffing attacks:
  32.         o  Active hubs
  33.         o  Encryption
  34.         o  Kerberos
  35.         o  One-time password technology
  36.         o  Non-promiscuous interfaces
  37.  
  38. -------------------------------------------------------------------------------
  39.  
  40. What a sniffer is and how it works
  41.  
  42. Unlike telephone circuits, computer networks are shared communication channels.
  43. It is simply too expensive to dedicate local loops to the switch (hub) for each
  44. pair of communicating computers. Sharing means that computers can receive
  45. information that was intended for other machines. To capture the information
  46. going over the network is called sniffing.
  47.  
  48. Most popular way of connecting computers is through ethernet. Ethernet protocol
  49. works by sending packet information to all the hosts on the same circuit. The
  50. packet header contains the proper address of the destination machine. Only the
  51. machine with the matching address is suppose to accept the packet. A machine
  52. that is accepting all packets, no matter what the packet header says, is said
  53. to be in promiscuous mode.
  54.  
  55. Because, in a normal networking environment, account and password information
  56. is passed along ethernet in clear-text, it is not hard for an intruder once
  57. they obtain root to put a machine into promiscuous mode and by sniffing,
  58. compromise all the machines on the net.
  59.  
  60. -------------------------------------------------------------------------------
  61.  
  62. Where are sniffers available
  63.  
  64. Sniffing is one of the most popular forms of attacks used by hackers. One
  65. special sniffer, called Esniff.c, is very small, designed to work on Sunos, and
  66. only captures the first 300 bytes of all telnet, ftp, and rlogin sessions. It
  67. was published in Phrack, one of the most widely read freely available
  68. underground hacking magazines. You can find Phrack on many FTP sites. Esniff.c
  69. is also available on many FTP sites such as coombs.anu.edu.au:/pub/net/log.
  70.  
  71. You may want to run Esniff.c on an authorized network to quickly see how
  72. effective it is in compromising local machines.
  73.  
  74. Other sniffers that are widely available which are intended to debug network
  75. problems are:
  76.  
  77.    *  Etherfind on SunOs4.1.x
  78.    *  Snoop on Solaris 2.x and SunOs 4.1 (on ftp playground.sun.com)
  79.    *  Tcpdump 3.0 uses bpf for a multitude of platforms.
  80.    *  Packetman, Interman, Etherman, Loadman works on the following platforms:
  81.      SunOS, Dec-Mips, SGI, Alpha, and Solaris. It is available on
  82.      ftp.cs.curtin.edu.au:/pub/netman/[sun4c|dec-mips|sgi|alpha|solaris2]/
  83.      [etherman-1.1a|interman-1.1|loadman-1.0|packetman-1.1].tar.Z
  84.      Packetman was designed to capture packets, while Interman, Etherman, and
  85.      Loadman monitor traffic of various kinds.
  86.  
  87.      DOS based sniffers
  88.  
  89.    *  Gobbler for IBM DOS Machines
  90.    *  ethdump v1.03
  91.      Available on ftp
  92.      ftp.germany.eu.net:/pub/networking/inet/ethernet/ethdp103.zip
  93.    *  ethload v1.04
  94.      Companion utility to a ethernet monitor. Available on ftp
  95.      ftp.germany.eu.net:/pub/networking/monitoring/ethload/ethld104.zip
  96.  
  97. Commercial Sniffers are available at:
  98.  
  99.    *  Network General.
  100.  
  101.           Network General produces a number of products. The most
  102.           important are the Expert Sniffer, which not only sniffs on the
  103.           wire, but also runs the packet through a high-performance expert
  104.           system, diagnosing problems for you. There is an extension onto
  105.           this called the "Distributed Sniffer System" that allows you to
  106.           put the console to the expert sniffer on you Unix workstation
  107.           and to distribute the collection agents at remote sites.
  108.  
  109.    *  Microsoft's Net Monitor
  110.  
  111.           " My commercial site runs many protocols on one wire - NetBeui,
  112.           IPX/SPX, TCP/IP, 802.3 protocols of various flavors, most
  113.           notably SNA. This posed a big problem when trying to find a
  114.           sniffer to examine the network problems we were having, since I
  115.           found that some sniffers that understood Ethernet II parse out
  116.           some 802.3 traffic as bad packets, and vice versa. I found that
  117.           the best protocol parser was in Microsoft's Net Monitor product,
  118.           also known as Bloodhound in its earlier incarnations. It is able
  119.           to correctly identify such oddities as NetWare control packets,
  120.           NT NetBios name service broadcasts, etc, which etherfind on a
  121.           Sun simply registered as type 0000 packet broadcasts. It
  122.           requires MS Windows 3.1 and runs quite fast on a HP XP60 Pentium
  123.           box. Top level monitoring provides network statistics and
  124.           information on conversations by mac address (or hostname, if you
  125.           bother with an ethers file). Looking at tcpdump style details is
  126.           as simple as clicking on a conversation. The filter setup is
  127.           also one of the easiest to implement that I've seen, just click
  128.           in a dialog box on the hosts you want to monitor. The number of
  129.           bad packets it reports on my network is a tiny fraction of that
  130.           reported by other sniffers I've used. One of these other
  131.           sniffers in particular was reporting a large number of bad
  132.           packets with src mac addresses of aa:aa:aa:aa:aa:aa but I don't
  133.           see them at all using the MS product. - Anonymous
  134.  
  135. -------------------------------------------------------------------------------
  136.  
  137. How to detect a sniffer running.
  138.  
  139. To detect a sniffing device that only collects data and does not respond to any
  140. of the information, requires physically checking all your ethernet connections
  141. by walking around and checking the ethernet connections individually.
  142.  
  143. It is also impossible to remotely check by sending a packet or ping if a
  144. machine is sniffing.
  145.  
  146. A sniffer running on a machine puts the interface into promiscuous mode, which
  147. accepts all the packets. On some Unix boxes, it is possible to detect a
  148. promiscuous interface. It is possible to run a sniffer in non-promiscuous mode,
  149. but it will only capture sessions from the machine it is running on. It is also
  150. possible for the intruder to do similiar capture of sessions by trojaning many
  151. programs such as sh, telnet, rlogin, in.telnetd, and so on to write a log file
  152. of what the user did. They can easily watch the tty and kmem devices as well.
  153. These attacks will only compromise sessions coming from that one machine, while
  154. promiscuous sniffing compromises all sessions on the ethernet.
  155.  
  156. For SunOs, NetBSD, and other possible BSD derived Unix systems, there is a
  157. command
  158.  
  159.      "ifconfig -a"
  160.  
  161. that will tell you information about all the interfaces and if they are in
  162. promiscuous mode. DEC OSF/1 and IRIX and possible other OSes require the device
  163. to be specified. One way to find out what interface is on the system, you can
  164. execute:
  165.  
  166.      # netstat -r
  167.      Routing tables
  168.  
  169.      Internet:
  170.      Destination      Gateway            Flags     Refs     Use  Interface
  171.      default          iss.net            UG          1    24949  le0
  172.      localhost        localhost          UH          2       83  lo0
  173.  
  174. Then you can test for each interface by doing the following command:
  175.  
  176.      #ifconfig le0
  177.      le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,MULTICAST>
  178.              inet 127.0.0.1 netmask 0xffffff00 broadcast 255.0.0.1
  179.  
  180. Intruders often replace commands such as ifconfig to avoid detection. Make sure
  181. you verify its checksum.
  182.  
  183. There is a program called cpm available on ftp.cert.org:/pub/tools/cpm that
  184. only works on Sunos and is suppose to check the interface for promiscuous flag.
  185.  
  186. Ultrix can possibly detect someone running a sniffer by using the commands
  187. pfstat and pfconfig.
  188.  
  189. pfconfig allows you to set who can run a sniffer
  190. pfstat shows you if the interface is in promiscuous mode.
  191.  
  192. These commands only work if sniffing is enabled by linking it into the kernel.
  193. by default, the sniffer is not linked into the kernel. Most other Unix systems,
  194. such as Irix, Solaris, SCO, etc, do not have any flags indication whether they
  195. are in promiscuous mode or not, therefore an intruder could be sniffing your
  196. whole network and there is no way to detect it.
  197.  
  198. Often a sniffer log becomes so large that the file space is all used up. On a
  199. high volume network, a sniffer will create a large load on the machine. These
  200. sometimes trigger enough alarms that the administrator will discover a sniffer.
  201. I highly suggest using lsof (LiSt Open Files) available from
  202. coast.cs.purdue.edu:/pub/Purdue/lsof for finding log files and finding programs
  203. that are accessing the packet device such as /dev/nit on SunOs.
  204.  
  205. There is no commands I know of to detect a promiscuous IBM PC compatible
  206. machine, but they atleast usually do not allow command execution unless from
  207. the console, therefore remote intruders can not turn a PC machine into a
  208. sniffer without inside assistance.
  209.  
  210. -------------------------------------------------------------------------------
  211.  
  212. Stopping sniffing attacks
  213.  
  214. Active hubs send to each system only packets intended for it rendering
  215. promiscuous sniffing useless. This is only effective for 10-Base T.
  216.  
  217. The following vendors have available active hubs:
  218.  
  219.    *  3Com
  220.    *  HP
  221.  
  222. -------------------------------------------------------------------------------
  223.  
  224. Encryption
  225.  
  226. There are several packages out there that allow encryption between connections
  227. therefore an intruder could capture the data, but could not decypher it to make
  228. any use of it.
  229.  
  230. Some packages available are:
  231.  
  232.    *  deslogin is one package available at ftp
  233.      coast.cs.purdue.edu:/pub/tools/unix/deslogin .
  234.  
  235.    * swIPe is another package available at
  236.      ftp.csua.berkeley.edu:/pub/cypherpunks/swIPe/
  237.  
  238.    * Netlock encrypts all (tcp, udp, and raw ip based) communications
  239.      transparently. It has automatic (authenticated Diffie-Helman) distibuted
  240.      key management mechanism for each host and runs on the SUN 4.1 and HP 9.x
  241.      systems. The product comes with a Certification Authority Management
  242.      application which generates host certificates (X.509) used for
  243.      authentication between the hosts. and provides centralized control of each
  244.      Hosts communications rules.
  245.  
  246.      The product is built by Hughes Aircraft and they can be reached at
  247.      800-825-LOCK or email at netlock@mls.hac.com.
  248.  
  249. -------------------------------------------------------------------------------
  250.  
  251. Kerberos
  252.  
  253. Kerberos is another package that encrypts account information going over the
  254. network. Some of its draw backs are that all the account information is held on
  255. one host and if that machine is compromised, the whole network is vulnerable.
  256. It is has been reported a major difficulty to set up. Kerberos comes with a
  257. stream-encrypting rlogind, and stream-encrypting telnetd is available. This
  258. prevents intruders from capturing what you did after you logged in.
  259.  
  260. There is a Kerberos FAQ at ftp at rtfm.mit.edu in
  261. /pub/usenet/comp.protocols/kerberos/Kerberos_Users__Frequently_Asked_Questions_1.11
  262.  
  263. -------------------------------------------------------------------------------
  264.  
  265. One time password technology
  266.  
  267. S/key and other one time password technology makes sniffing account information
  268. almost useless. S/key concept is having your remote host already know a
  269. password that is not going to go over insecure channels and when you connect,
  270. you get a challenge. You take the challenge information and password and plug
  271. it into an algorithm which generates the response that should get the same
  272. answer if the password is the same on the both sides. Therefore the password
  273. never goes over the network, nor is the same challenge used twice. Unlike
  274. SecureID or SNK, with S/key you do not share a secret with the host. S/key is
  275. available on ftp:thumper.bellcore.com:/pub/nmh/skey
  276.  
  277. Other one time password technology is card systems where each user gets a card
  278. that generates numbers that allow access to their account. Without the card, it
  279. is improbable to guess the numbers.
  280.  
  281. The following are companies that offer solutions that are provide better
  282. password authenication (ie, handheld password devices):
  283.  
  284. Secure Net Key (SNK)
  285.  
  286. Digital Pathways, Inc.
  287. 201 Ravendale Dr. Mountainview, Ca.
  288. 97703-5216 USA
  289.  
  290. Phone: 415-964-0707 Fax: (415) 961-7487
  291.  
  292. Secure ID
  293.  
  294. Security Dynamics,
  295. One Alewife Center
  296. Cambridge, MA 02140-2312
  297. USA Phone: 617-547-7820
  298. Fax: (617) 354-8836
  299. Secure ID uses time slots as authenication rather than challenge/response.
  300.  
  301. ArKey and OneTime Pass
  302.  
  303. Management Analytics
  304. PO Box 1480
  305. Hudson, OH 44236
  306. Email: fc@all.net
  307. Tel:US+216-686-0090 Fax: US+216-686-0092
  308.  
  309. OneTime Pass (OTP):
  310. This program provides unrestricted one-time pass codes on a user by user basis
  311. without any need for cryptographic protocols or hardware devices. The user
  312. takes a list of usable pass codes and scratches out each one as it is used. The
  313. system tracks usage, removing each passcode from the available list when it is
  314. used. Comes with a very small and fast password tester and password and pass
  315. phrase generation systems.
  316.  
  317. ArKey:
  318. This is the original Argued Key system that mutually authenticates users and
  319. systems to each other based on their common knowledge. No hardware necessary.
  320. Comes with a very small and fast password tester and password and pass phrase
  321. generation systems.
  322.  
  323. WatchWord and WatchWord II
  324.  
  325. Racal-Guardata
  326. 480 Spring Park Place
  327. Herndon, VA 22070
  328. 703-471-0892
  329. 1-800-521-6261 ext 217
  330.  
  331. CRYPTOCard
  332.  
  333. Arnold Consulting, Inc.
  334. 2530 Targhee Street, Madison, Wisconsin
  335. 53711-5491 U.S.A.
  336. Phone : 608-278-7700 Fax: 608-278-7701
  337. Email: Stephen.L.Arnold@Arnold.Com
  338. CRYPTOCard is a modern, SecureID-sized, SNK-compatible device.
  339.  
  340. SafeWord
  341.  
  342. Enigma Logic, Inc.
  343. 2151 Salvio #301
  344. Concord, CA 94520
  345. 510-827-5707 Fax: (510)827-2593
  346. For information about Enigma ftp to: ftp.netcom.com in directory
  347. /pub/sa/safeword
  348.  
  349. Secure Computing Corporation:
  350.  
  351. 2675 Long Lake Road
  352. Roseville, MN 55113
  353. Tel: (612) 628-2700
  354. Fax: (612) 628-2701
  355. debernar@sctc.com
  356.  
  357. -------------------------------------------------------------------------------
  358.  
  359. Non-promiscuous Interfaces
  360.  
  361. You can try to make sure that most IBM DOS compatible machines have interfaces
  362. that will not allow sniffing. Here is a list of cards that do not support
  363. promiscuous mode:
  364.  
  365. Test the interface for promiscuous mode by using the Gobbler. If you find a
  366. interface that does do promiscuous mode and it is listed here, please e-mail
  367. cklaus@iss.net so I can remove it ASAP.
  368.  
  369.      IBM Token-Ring Network PC Adapter
  370.      IBM Token-Ring Network PC Adapter II (short card)
  371.      IBM Token-Ring Network PC Adapter II (long card)
  372.      IBM Token-Ring Network 16/4 Adapter
  373.      IBM Token-Ring Network PC Adapter/A
  374.      IBM Token-Ring Network 16/4 Adapter/A
  375.      IBM Token-Ring Network 16/4 Busmaster Server Adapter/A
  376.  
  377. The following cards are rumoured to be unable to go into promiscuous mode, but
  378. that the veracity of those rumours is doubtful.
  379.  
  380.      Microdyne (Excelan) EXOS 205
  381.      Microdyne (Excelan) EXOS 205T
  382.      Microdyne (Excelan) EXOS 205T/16
  383.      Hewlett-Packard 27250A EtherTwist PC LAN Adapter Card/8
  384.      Hewlett-Packard 27245A EtherTwist PC LAN Adapter Card/8
  385.      Hewlett-Packard 27247A EtherTwist PC LAN Adapter Card/16
  386.      Hewlett-Packard 27248A EtherTwist EISA PC LAN Adapter Card/32
  387.      HP 27247B EtherTwist Adapter Card/16 TP Plus
  388.      HP 27252A EtherTwist Adapter Card/16 TP Plus
  389.      HP J2405A EtherTwist PC LAN Adapter NC/16 TP
  390.  
  391. Adapters based upon the TROPIC chipset generally do not support promiscuous
  392. mode. The TROPIC chipset is used in IBM's Token Ring adapters such as the 16/4
  393. adapter. Other vendors (notably 3Com) also supply TROPIC based adapters.
  394. TROPIC-based adapters do accept special EPROMs, however, that will allow them
  395. to go into promiscuous mode. However, when in promiscuous mode, these adapters
  396. will spit out a "Trace Tool Present" frame.
  397.  
  398. -------------------------------------------------------------------------------
  399.  
  400. Acknowledgements
  401.  
  402. I would like to thank the following people for the contribution to this FAQ
  403. that has helped to update and shape it:
  404.  
  405.    *  Padgett Peterson (padgett@tccslr.dnet.mmc.com)
  406.    *  Steven Bellovin (smb@research.att.com)
  407.    *  Wietse Venema (wietse@wzv.win.tue.nl)
  408.    *  Robert D. Graham (robg@NGC.COM)
  409.    *  Kevin Martinez (kevinm@beavis.qntm.com)
  410.    *  Frederick B. Cohen (fc@all.net)
  411.    *  James Bonfield (jkb@mrc-lmb.cam.ac.uk)
  412.    *  Marc Horowitz (marc@MIT.EDU)
  413.    *  Steve Edwards (steve@newline.com)
  414.    *  Andy Poling (Andy.Poling@jhu.edu)
  415.    *  Jeff Collyer (jeff@cnet-pnw.com)
  416.    *  Sara Gordon (sgordon@sun1.iusb.indiana.edu)
  417.  
  418. -------------------------------------------------------------------------------
  419.  
  420. Copyright
  421.  
  422. This paper is Copyright (c) 1994, 1995
  423.    by Christopher Klaus of Internet Security Systems, Inc.
  424.  
  425. Permission is hereby granted to give away free copies electronically. You may
  426. distribute, transfer, or spread this paper electronically. You may not pretend
  427. that you wrote it. This copyright notice must be maintained in any copy made.
  428. If you wish to reprint the whole or any part of this paper in any other medium
  429. (ie magazines, books, etc) excluding electronic medium, please ask the author
  430. for permission.
  431.  
  432. Disclaimer
  433.  
  434. The information within this paper may change without notice. Use of this
  435. information constitutes acceptance for use in an AS IS condition. There are NO
  436. warranties with regard to this information. In no event shall the author be
  437. liable for any damages whatsoever arising out of or in connection with the use
  438. or spread of this information. Any use of this information is at the user's own
  439. risk.
  440.  
  441. Address of Author
  442.  
  443. Please send suggestions, updates, and comments to:
  444. Christopher Klaus <cklaus@iss.net> of Internet Security Systems, Inc.
  445. <iss@iss.net>
  446.  
  447. Internet Security Systems, Inc.
  448.  
  449. Internet Security Systems, Inc, located in Atlanta, Ga., specializes in the
  450. developement of security scanning software tools. Its flagship product,
  451. Internet Scanner, is software that learns an organization's network and probes
  452. every device on that network for security holes. It is the most comprehensive
  453. "attack simulator" available, checking for over 100 security vulnerabilities.
  454.  
  455. -- 
  456. Christopher William Klaus       Voice: (404)441-2531. Fax: (404)441-2431
  457. Internet Security Systems, Inc.         Computer Security Consulting
  458. 2000 Miller Court West, Norcross, GA 30071
  459.